package com.lry.rpc.netty.client;

import com.lry.protocol.RpcMessage;
import com.lry.protocol.RpcResult;
import com.lry.proxy.RpcCallback;
import io.netty.channel.Channel;

import java.io.IOException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeoutException;

public interface MessageSender {

    Object sendSyncRequest(Channel channel,Object message) throws TimeoutException  ;

    Object sendSyncRequest(Channel channel,Object message,int tryCount)  throws TimeoutException ;

    Future<Object> sendAsyncRequest(Channel channel, Object message, RpcCallback<Object> callback)  ;

}


